package com.zhiyou.brank.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zhiyou.brank.service.FlyBrand_informService;
import com.zhiyou.model.FyBrand_inform;
import com.zhiyou.utils.JsonResult;


@RestController
@RequestMapping("brand_inform/")
public class FlyBrand_informController {
@Autowired	
FlyBrand_informService flyBrand_informService;//123
	@PostMapping("brand_informAdd")
	public void brand_informAdd(FyBrand_inform fyBrand_inform,HttpServletResponse req,HttpServletRequest rep){		
		flyBrand_informService.brand_informAdd(fyBrand_inform);
	}
	@PostMapping("brand_informUpdate")
	public void brand_informUpdate(FyBrand_inform fyBrand_inform,HttpServletResponse req,HttpServletRequest rep){		
		flyBrand_informService.brand_informUpdate(fyBrand_inform);
	}
	@PostMapping("brand_informDelete")
	public void brand_informDelete(Integer brand_inform_id,HttpServletResponse req,HttpServletRequest rep){		
		flyBrand_informService.brand_informDelete(brand_inform_id);;
	}
	@GetMapping("brand_informSelectAll")
	public JsonResult brand_informSelectAll(HttpServletResponse req,HttpServletRequest rep){		
		return new JsonResult(flyBrand_informService.brand_informSelectAll(),"查询成功");				
	}
	@GetMapping("brand_informSelectById/{brand_inform_id}")
	public JsonResult brand_informSelectById(@PathVariable("brand_inform_id")Integer brand_inform_id,HttpServletResponse req,HttpServletRequest rep){		
		return new JsonResult(flyBrand_informService.brand_informSelectById(brand_inform_id),"查询成功");
	}
}
